<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html class="x-admin-sm">

<head>
    <meta charset="UTF-8">
    <title>后台管理</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
        content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="stylesheet" href="/admin/static/css/font.css">
    <link rel="stylesheet" href="/admin/static/css/xadmin.css">
    <script type="text/javascript" src="/admin/static/js/jquery.min.js"></script>
    <script type="text/javascript" src="/admin/static/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="/admin/static/js/xadmin.js"></script>

    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
      <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
      <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>

<body>
    <div class="x-body">
        <form class="layui-form" action="/admin/member/add" method="POST" enctype="multipart/form-data">
            <div class="layui-form-item">
                <label for="L_name" class="layui-form-label">
                    <span class="x-red">*</span>姓名
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="L_name" name="name" required="" lay-verify="member_name" autocomplete="off"
                        class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label for="L_positional_title" class="layui-form-label">
                    <span class="x-red">*</span>职称
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="L_positional_title" name="positionalTitle" required=""
                        lay-verify="positional_title" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label for="L_duties" class="layui-form-label">
                    <span class="x-red">*</span>职务
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="L_duties" name="duties" required="" lay-verify="duties" autocomplete="off"
                        class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label for="L_education" class="layui-form-label">
                    <span class="x-red">*</span>学历
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="L_education" name="education" required="" lay-verify="education"
                        autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label for="L_role" class="layui-form-label">
                    <span class="x-red">*</span>角色
                </label>
                <div class="layui-input-inline">
                    <select type="text" id="L_role" name="subMenuId" required="" lay-verify="role"
                        autocomplete="off" >
                        <c:forEach items="${subMenuList}" var="item">
                            <option value="${item.id}">${item.title}</option>
                        </c:forEach>
                    </select>

                </div>
            </div>
            <div class="layui-form-item">
                <label for="L_email" class="layui-form-label">
                    <span class="x-red">*</span>邮箱
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off"
                        class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label for="L_phone" class="layui-form-label">
                    <span class="x-red">*</span>电话
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="L_phone" name="phone" required="" lay-verify="phone" autocomplete="off"
                        class="layui-input">
                </div>
            </div>
            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">个人简介</label>
                <div class="layui-input-block">
                    <textarea name="profile" placeholder="请输入内容" class="layui-textarea"></textarea>
                </div>
            </div>
            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">研究方向</label>
                <div class="layui-input-block">
                    <textarea name="direction" placeholder="请输入内容" class="layui-textarea"></textarea>
                </div>
            </div>
            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">工作经历</label>
                <div class="layui-input-block">
                    <textarea name="experience" placeholder="请输入内容" class="layui-textarea"></textarea>
                </div>
            </div>
            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">荣誉称号</label>
                <div class="layui-input-block">
                    <textarea name="honoraryTitle" placeholder="请输入内容" class="layui-textarea"></textarea>
                </div>
            </div>
            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">科研项目</label>
                <div class="layui-input-block">
                    <textarea name="project" placeholder="请输入内容" class="layui-textarea"></textarea>
                </div>
            </div>
            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">成果</label>
                <div class="layui-input-block">
                    <textarea name="achievement" placeholder="请输入内容" class="layui-textarea"></textarea>
                </div>
            </div>
            <div class="layui-form-item">
                <label for="" class="layui-form-label">
                    <span class="x-red">*</span>图片
                </label>
                <button type="button" class="layui-btn" id="file-btn">
                    <i class="layui-icon">&#xe67c;</i>选择图片
                </button>
                <input type="file" name="img" id="file-input" style="display: none" lay-verify="required" accept="image/*">
                <span id="show"></span>
            </div>

            <div class="layui-form-item">
                <label for="L_repass" class="layui-form-label">
                </label>
                <button class="layui-btn" lay-filter="modify" lay-submit="">
                    增加
                </button>
            </div>
        </form>
    </div>
    <script>
        $('#file-btn').on('click', function () {
            $('#file-input').click();
        });
        $('#file-input').on('change', function () {
            $('#show').text(this.files[0].name)
        });
    </script>
</body>

</html>